//
//  SampuxGetWifiSucessVC.m
//  Sampux
//
//  Created by rzm on 16/7/11.
//  Copyright © 2016年 rzm. All rights reserved.
//

#import "SampuxAddEquipMentSucessVC.h"
#import "SampuxAddEquipMentSucessView.h"
#import "SampuxAddEquipMentFaithVC.h"


@interface SampuxAddEquipMentSucessVC ()

@end

@implementation SampuxAddEquipMentSucessVC

- (void)viewDidLoad {
    
    [super viewDidLoad];
//    [self createBackBarButtonItem];
    [self.navigationItem setHidesBackButton:YES];

    SampuxAddEquipmentSucessView *sucessView = [[SampuxAddEquipmentSucessView alloc]initWithFrame:CGRectMake(0, 0, self.view.width, self.view.height)];
    sucessView.numStr = self.numStr;
    [self.view addSubview:sucessView];
    sucessView.backBlock = ^(){
        dispatch_async(dispatch_get_main_queue(), ^{
        [self.navigationController popViewControllerAnimated:YES];
        });
    };
    sucessView.makeSureBlock = ^()
    {
        dispatch_async(dispatch_get_main_queue(), ^{
            UIViewController *aViewController = [self.navigationController.viewControllers objectAtIndex:0];
            aViewController.navigationController.navigationBar.hidden = NO;
            [self.navigationController popToViewController:aViewController animated:YES];
        });
    };
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:YES];
    SampuxCustomNavController *nav = (SampuxCustomNavController *)self.navigationController;
    nav.titleStr = @"";
    nav.navigationBar.hidden = YES;
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:YES];
    SampuxCustomNavController *nav = (SampuxCustomNavController *)self.navigationController;
    nav.navigationBar.hidden = NO;
}



@end
